package reflect;

import reflect.annotation.AutoRunMethod;

import java.lang.reflect.Method;

public class ReflectDemo11 {
    public static void main(String[] args)  throws Exception{
        Class cls =Class.forName("reflect.Person");
        Method method =cls.getMethod("doSome");
        boolean mark =method.isAnnotationPresent(AutoRunMethod.class);
        if (mark){
            System.out.println("有注解");
        }else {
            System.out.println("没有注解");
        }
        }
    }

